﻿using FairyGUI;
using System;

public class UIGameHeadpicImage : UIHeadpicImage {

    GImage _zhuangImg;
    GImage _offlineImg;

	public UIGameHeadpicImage(GComponent comp, Action callback)
        : base(comp, callback)
    {
        _zhuangImg = comp.GetChild("庄").asImage;
        _offlineImg = comp.GetChild("离线").asImage;
    }

    /// <summary>
    /// 庄显示/不显示
    /// </summary>
    public bool zhuangVisible
    {
        get
        {
            return _zhuangImg.visible;
        }

        set
        {
            _zhuangImg.visible = value;
            _zhuangImg.enabled = value;
        }
    }

    /// <summary>
    /// 离线显示/不显示
    /// </summary>
    public bool offlineVisible
    {
        get
        {
            return _offlineImg.visible;
        }

        set
        {
            _offlineImg.visible = value;
            _offlineImg.enabled = value;
        }
    }
}
